home *** CD-ROM | disk | FTP | other *** search
- import java.awt.Frame;
- import java.awt.event.WindowAdapter;
- import java.awt.event.WindowEvent;
-
- class WinClose extends WindowAdapter {
- Frame frame;
-
- public WinClose(Frame frame) {
- this.frame = frame;
- }
-
- public void windowClosing(WindowEvent e) {
- this.frame.dispose();
- }
-
- public void windowDeactivated(WindowEvent e) {
- System.out.println("try to go to front");
- }
- }
-